The present invention relates to microcontroller systems having flash memory in a program memory address space and, in particular, to a microcontroller having security circuitry such that a program executing from one portion of the flash memory of the microcontroller can securely program or reprogram another portion of the flash memory.
Microcontroller systems-including memory are known in the art. With a conventional microcontroller system, blocks of the memory may be locked such that a locked block cannot be interrogated. This locking thus secures program code contained in the locked blocks from unauthorized access by firmware piraters and from accidental erasing and programming.
However, conventionally, neither can the locked blocks be conveniently reprogrammed or accessed by -an authorized user. It is desirable for a microcontroller system to be configurable such that blocks of memory can be locked from unauthorized interrogation or code corruption, but can also be reprogrammed and/or accessed under a predetermined secure environment.
In accordance with the present invention, a microcontroller system includes a security lock circuit to regulate access requests to contents of locations of a program memory. The regulation is selective, based on an operating mode of the security-lock circuit, and also based on the source of the access request and the location of the program memory for which the access request is intended. Among other advantages, one major advantage provided by the security lock circuit is that concurrent programming (i.e., programming of one area of memory using instructions executing from another area of memory) can be initiated under predetermined secure conditions.